package com.jy.wms.common.quartz;

import com.jy.wms.service.WmsProductCategorysService;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.SimpleDateFormat;

public class WmsProductCategoryJob implements Job{
    private WmsProductCategorysService wmsProductCategorysService;
    private static Logger log = LoggerFactory.getLogger(WmsProductCategoryJob.class);
    private SimpleDateFormat dateFormat() {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    }
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

        try {
            System.out.println("订单量汇总定时器任务开始");
         JobDataMap dataMap = jobExecutionContext.getJobDetail().getJobDataMap();
            wmsProductCategorysService = (WmsProductCategorysService) dataMap.get("wmsProductCategorysService");
            wmsProductCategorysService.ProvincialTimer();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
